import { Message } from 'element-ui'

export function toast(msg, type = 1) {
  if (type === 2) {
    type = 'success'
  } else {
    type = 'error'
  }
  Message({
    message: msg,
    type: type,
    duration: 2 * 500
  })
}

